package externalflame.systemdesign.newsfeed.dao;

import externalflame.systemdesign.newsfeed.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDao {
    @Select("select id, username, password, created_time from user where username = #{username}")
    User getByUserName(@Param("username") String userName);

    @Insert("insert into user (id, username, password) values (#{id}, #{username}, #{password})")
    void insert(@Param("id") Long id, @Param("username") String userName, @Param("password") String password, @Param("createdTime") Long createdTime);
}
